ITEM.Name = "Ration Dispenser";

ITEM.Model = "models/items/item_item_crate.mdl";

ITEM.Width = 2;
ITEM.Height = 2;

ITEM.InvWidth = 6;
ITEM.InvHeight = 6;

ITEM.Description = "Automated Ration Dispense";

ITEM.Price = 20

ITEM.Flags = "u";

ITEM.CamPos = Vector( 2, 0, 200 );
ITEM.LookAt = Vector( 0, 0, 10 );
ITEM.FOV = 16;

function ITEM:Use()
	
	local trace = { }
	trace.start = self.Owner:EyePos() - Vector( 0, 0, 30 );
	trace.endpos = trace.start + self.Owner:GetAngles():Forward() * 40;
	trace.filter = self.Owner;
	
	local tr = util.TraceLine( trace );
	
	local lock = ents.Create( "ts2_rationdispensa" )
	lock:SetPos( tr.HitPos )
	lock:Spawn()
	lock:Activate()

end	
